#include "life.h"
#include "port.h"
#include "time.h"
#include "serial.h"

/**
 * Start of the robot's lifecycle
 * Place all self-test code and initialization code in this function.
 * @author David Asabina
 * @return integer value based based on code encapsulated in function
 */
uint8_t wake(){
  // set IO directions
  DDRB = _BV (PB5);
  return 0;
  
}

/**
 * The operational-mode of the robot's lifecycle
 * The code to specify the behavious of the robot in its operational
 * mode.
 * @author David Asabina
 * @return integer value based based on code encapsulated in function
 */
uint8_t live(){
  while(1){
    // simply blink a LED
    pinToggle(PB5, &PORTB);
    delay(64000);
  }
  return 0;
}

/**
 * The shut-down phase of the robot's lifecyle
 * All code to verify succesful completion of objectives and proper
 * shutdown of used modules should be implemented within this function.
 * @author David Asabina
 * @return integer value based based on code encapsulated in function
 */
uint8_t die(){
  return 0;
}
